package com.xyht.sca_s.student_manage_system.modules.purchaseRequisition.controller;


import com.xyht.sca_s.student_manage_system.common.commonReturn.ResponseResult;
import com.xyht.sca_s.student_manage_system.common.desEncodeAndDecode.annotation.SecretBody;
import com.xyht.sca_s.student_manage_system.modules.purchaseRequisition.entity.dto.SmsPurchaseRequisitionProcessDto;
import com.xyht.sca_s.student_manage_system.modules.purchaseRequisition.service.SmsPurchaseRequisitionProcessService;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author XYHT
 * @since 2023-06-05
 */
@RestController
@RequestMapping("/purchaseRequisition/process")
@SecretBody
public class SmsPurchaseRequisitionProcessController {

    @Resource
    private SmsPurchaseRequisitionProcessService processService;

    @ApiModelProperty("流程列表")
    @GetMapping("/list")
    public ResponseResult getRequisitionProcessList(){
        return processService.getRequisitionProcessList();
    }

    @ApiModelProperty("流程修改")
    @PostMapping("/update")
    public ResponseResult updateRequisitionProcess(@RequestBody SmsPurchaseRequisitionProcessDto updateProcessDto){
        return processService.updateRequisitionProcess(updateProcessDto);
    }
}

